import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter);

const routes = [
    {
        path: '/',
        redirect: '/share',
    },
    {
        path: '/index',
        name: 'index',
        component: () => import('@/views/index/index'),
    },
    // 填写验证发页面
    {
        path: '/verifyCode',
        name: 'VerifyCode',
        component: () => import('@/views/verifyCode/index'),
    },
    {
        path: '/code',
        name: 'Code',
        component: () => import('@/views/code/index'),
    },
    {
        path: '/login',
        name: 'Login',
        component: () => import('@/views/login/index'),
    },
    {
        path: '/validPassword',
        name: 'ValidPassword',
        component: () => import('@/views/validPassword/index'),
    },
    {
        path: '/share',
        name: 'Share',
        component: () => import('@/views/share/index'),
    },
    {
        path: '/success',
        name: 'Success',
        component: () => import('@/views/success/index'),
    },
    {
        path: '/codePhone',
        name: 'CodePhone',
        component: () => import('@/views/codePhone/index'),
    },
    {
        path: '/orderClose',
        name: 'OrderClose',
        component: () => import('@/views/orderClose/index'),
    },
    {
        path: '/my-interest',
        name: 'myInterest',
        component: () => import('@/views/myInterest/index'),
        meta: { title: '我的权益' },
    },
    {
        path: '/authentication',
        name: 'authentication',
        component: () => import('@/views/authentication/index'),
        meta: { title: '身份验证' },
    },
    {
        path: '/resView',
        name: 'resView',
        component: () => import('@/views/authentication/resView'),
        meta: { title: '身份验证-结果页面' },
    },
    {
        path: '/otherValid',
        name: 'otherValid',
        component: () => import('@/views/authentication/otherValid'),
        meta: { title: '身份验证-其他验证方式' },
    },
    {
        path: '/resultFiled',
        name: 'resultFiled',
        component: () => import('@/views/resultFiled/index'),
        meta: { title: '购买失败', isHidden: true },
    },
];

const router = new VueRouter({
    routes,
});

export default router;
